// pages/my/index.js
const app = getApp()
Page({
  data: {
    userInfo: '',
    img: "https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif?imageView2/1/w/80/h/80",
    name: '点击登录',
    address: '',
    score: '50',
    code: ''
  },
  login () {
    var token = wx.getStorageSync('token')
    if(token){
      return
    }
    wx.navigateTo({
      url: 'loging/index',
    })
  },
  onShow: function () {
    this.setData({
      userInfo: wx.getStorageSync('userInfo') ? JSON.parse(wx.getStorageSync('userInfo')) : '',
      address:wx.getStorageSync('service')
    })
  },
 })
